package com.demo10;

/**
 * Created by Administrator on 2017/4/14.
 */
public class BreakTest {
    public static void main(String[] args) {
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 6; j++) {
                if (j == 4) {
                    break;
                }
                System.out.println("i=" + i + "j=" + j);
            }
        }
        System.out.println("---end---");
        Loop:
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 6; j++) {
                if (j == 4) {
                    break Loop;
                }
                System.out.println("i=" + i + "j=" + j);
            }
        }
    }
}
